<#import "/analysis/function.ftl" as fn>
<@fn.header _title="差异家庭户数统计">
<@fn.getStreet />
</@fn.header>
<body>
<@fn.position _value="当前位置 &gt;&gt; 差异情况统计 &gt; 差异家庭户数统计" />
<div class="contentDiv">
  <div class="condition">
    <h2>统计条件</h2>
    <form id="listForm" method="post">
	    <table class="tableStyle">
	      <tr>
	        <td width="15%">系统操作时间区间：</td>
	        <td width="22%"><input name="acceptStartTime" type="text" class="btnTxtDate" id="textfield" onClick="WdatePicker()" />
	          至
	          <input name="acceptEndTime" type="text" class="btnTxtDate" id="textfield13" onClick="WdatePicker()" />
	          </td>
	        <td width="8%">所属区县：</td>
	        <td width="22%"><select name="countiesRegionId" class="btnSelect" id="country" onchange="getStreet(this.value)">
	            <option value="">-- 请选择 --</option>
				<#if countryRegionList??>
					<#list countryRegionList as region>
					  <option value="${region.id}">${region.name}</option>
					</#list>
				</#if>
	          </select>
	          </td>
	        <td width="11%">所属街道：</td>
	        <td width="22%"><select name="streetRegionId" class="btnSelect" id="street">
	            <option value="">-- 请选择 --</option>
	          </select></td>
	      </tr>
	    </table>
	    <table class="buttonT">
	      <tr>
	        <td width="10%"><input type="submit" class="button" value="统 计" /></td>
	      </tr>
	    </table>
	</form>
  </div>
  <div class="reasult">
    <h2>统计结果</h2>
    <table class="gridStyle">
      <tr>
        <th>区县</th>
        <th>街道</th>
        <th>中止核对 </th>
        <th>差异数 </th>
        <th>核对报告数 </th>
        <th>终止核对 </th>
      </tr>
        <#assign suspendCheckNumTotal=0 />
        <#assign diffNumTotal=0 />
        <#assign checkReportNumTotal=0 />
        <#assign terminateCheckNumTotal=0 />
      <#list resultList as data>
        <#assign suspendCheckNumTotal=suspendCheckNumTotal+ data.streetDiffFamilyDataList[0].suspendCheckNum />
        <#assign diffNumTotal=diffNumTotal+ data.streetDiffFamilyDataList[0].diffNum />
        <#assign checkReportNumTotal=checkReportNumTotal+ data.streetDiffFamilyDataList[0].checkReportNum />
        <#assign terminateCheckNumTotal=terminateCheckNumTotal+ data.streetDiffFamilyDataList[0].terminateCheckNum />
      <tr>
        <td<#if (data.streetDiffFamilyDataList?size>1)> rowspan="${data.streetDiffFamilyDataList?size}"</#if>>${data.countryRegionName}</td>
        <td>${data.streetDiffFamilyDataList[0].streetRegionName}</td>
        <td>${data.streetDiffFamilyDataList[0].suspendCheckNum}</td>
        <td>${data.streetDiffFamilyDataList[0].diffNum}</td>
        <td>${data.streetDiffFamilyDataList[0].checkReportNum}</td>
        <td>${data.streetDiffFamilyDataList[0].terminateCheckNum}</td>
      </tr>
	      <#if (data.streetDiffFamilyDataList?size>1)>
		      <#list data.streetDiffFamilyDataList[1..] as _data>
		        <#assign suspendCheckNumTotal=suspendCheckNumTotal+ _data.suspendCheckNum />
		        <#assign diffNumTotal=diffNumTotal+ _data.diffNum />
		        <#assign checkReportNumTotal=checkReportNumTotal+ _data.checkReportNum />
		        <#assign terminateCheckNumTotal=terminateCheckNumTotal+ _data.terminateCheckNum />
			      <tr>
			        <td>${_data.streetRegionName}</td>
			        <td>${_data.suspendCheckNum}</td>
			        <td>${_data.diffNum}</td>
			        <td>${_data.checkReportNum}</td>
			        <td>${_data.terminateCheckNum}</td>
			      </tr>
		      </#list>
	      </#if>
	  </#list>
      <tr>
        <td colspan="2">合计（户）</td>
        <td>${suspendCheckNumTotal}</td>
        <td>${diffNumTotal}</td>
        <td>${checkReportNumTotal}</td>
        <td>${terminateCheckNumTotal}</td>
      </tr>
    </table>
  </div>
  <div class="explain">
    <h3>说明：</h3>
    <p>1. 需考虑用户的数据访问权限，街道用户仅能统计到该街道的数据；区县用户能统计所属区县的所有数据；市中心能统计到所有数据。</p>
    <p>2. 统计表可以导出excel并打印。</p>
  </div>
</div>
</body>
</html>
